package com.example.teesystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_exam_paper
 */
@TableName(value ="t_exam_paper")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExamPaper implements Serializable{
    /**
     * key自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 试卷名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 课程id
     */
    @TableField(value = "course_id")
    private Integer courseId;

    /**
     * 难度系数（由易到难 1-5）
     */
    @TableField(value = "level")
    private Integer level;

    /**
     * 教师id
     */
    @TableField(value = "teacher_id")
    private Integer teacherId;

    /**
     * 考试开始时间
     */
    @TableField(value = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date startTime;

    /**
     * 考试结束时间
     */
    @TableField(value = "end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date endTime;

    /**
     * 考试班级
     */
    @TableField(value = "classes")
    private String classes;

    /**
     * 考试评价文件链接
     */
    @TableField(value = "url")
    private String url;

    /**
     * 是否发布（0：未发布，1：已发布）
     */
    @TableField(value = "is_publish")
    private Integer isPublish;

    /**
     * 是否完成答卷（0：未完成，1：已完成）
     */
    @TableField(value = "is_finish")
    private Integer isFinish;

    /**
     * 是否完成阅卷 (0：未完成，1：已完成)
     */
    @TableField(value = "is_mark")
    private Integer isMark;

    /**
     * 0 未删除， 1 已删除
     */
    @TableLogic
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * 满分分数
     */
    @TableField(value = "score")
    private Integer score;

    /**
     * 试卷说明
     */
    @TableField(value = "message")
    private String message;

    /**
     * 相关试卷
     */
    @TableField(value = "relate_paper_id")
    private String relatePaperId;

    /**
     * 0主试卷1生成的乱序试卷
     */
    @TableField(value = "main")
    private Integer main;

    /**
     * 上传时间
     */
    @TableField(value = "upload_time", fill = FieldFill.INSERT_UPDATE)
    private Date uploadTime;

    /**
     * 包含题型
     */
    @TableField(value = "include_issue_type")
    private String includeIssueType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}